/*
 * This file is part of Euphrat.
 *
 * Copyright © 2012 Bart Verhoeven
 *
 * Euphrat is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Euphrat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Euphrat. If not, see <http://www.gnu.org/licenses/>.
 */
package org.euphrat.client.controller.login;

import org.euphrat.client.service.login.LoginContext;

/**
 * Listener declaring actions to be undertaken when the login state changes.
 *
 * @author Bart Verhoeven
 */
public interface LoginListener {

  /**
   * Notifies the listener that a login request failed.
   *
   * @param context the up to date login context
   */
  void onLoginFailed(LoginContext context);

  /**
   * Notifies the listener that the user has logged in.
   *
   * @param context the up to date login context
   */
  void onLoggedIn(LoginContext context);

  /**
   * Notifies the listener that the user has logged out.
   *
   * @param context the up to date login context
   */
  void onLoggedOut(LoginContext context);

  /**
   * Notifies the listener that a login has been requested.
   *
   * @param context the up to date login context
   */
  void onLoginRequested(LoginContext context);
}
